#  给定一个不超过五位的正整数，判断该位数，且依次打印每个位数字

c = int(input("请输入一个不高于五位的正整数:"))
# 折半思想
if c >= 1000:
    if c >= 10000:
        num = 5
    else:
        num = 4
else:
    if c >= 100:
        num = 3
    elif c >= 10:
        num = 2
    else:
        num = 1
print("它是%d位数" %num)

w = 10**(num-1) # 计算它的权重
for i in range(num):
    print(c // w)
    c = c % w
    w = w // 10